using SoulsFormats;
using System.Collections.Generic;
using System.Numerics;

namespace HKX2
{
    public partial class hclObjectSpaceDeformerFourBlendEntryBlock : IHavokObject
    {
        public virtual uint Signature { get => 2701129585; }
        
        public ushort m_vertexIndices_0;
        public ushort m_vertexIndices_1;
        public ushort m_vertexIndices_2;
        public ushort m_vertexIndices_3;
        public ushort m_vertexIndices_4;
        public ushort m_vertexIndices_5;
        public ushort m_vertexIndices_6;
        public ushort m_vertexIndices_7;
        public ushort m_vertexIndices_8;
        public ushort m_vertexIndices_9;
        public ushort m_vertexIndices_10;
        public ushort m_vertexIndices_11;
        public ushort m_vertexIndices_12;
        public ushort m_vertexIndices_13;
        public ushort m_vertexIndices_14;
        public ushort m_vertexIndices_15;
        public ushort m_boneIndices_0;
        public ushort m_boneIndices_1;
        public ushort m_boneIndices_2;
        public ushort m_boneIndices_3;
        public ushort m_boneIndices_4;
        public ushort m_boneIndices_5;
        public ushort m_boneIndices_6;
        public ushort m_boneIndices_7;
        public ushort m_boneIndices_8;
        public ushort m_boneIndices_9;
        public ushort m_boneIndices_10;
        public ushort m_boneIndices_11;
        public ushort m_boneIndices_12;
        public ushort m_boneIndices_13;
        public ushort m_boneIndices_14;
        public ushort m_boneIndices_15;
        public ushort m_boneIndices_16;
        public ushort m_boneIndices_17;
        public ushort m_boneIndices_18;
        public ushort m_boneIndices_19;
        public ushort m_boneIndices_20;
        public ushort m_boneIndices_21;
        public ushort m_boneIndices_22;
        public ushort m_boneIndices_23;
        public ushort m_boneIndices_24;
        public ushort m_boneIndices_25;
        public ushort m_boneIndices_26;
        public ushort m_boneIndices_27;
        public ushort m_boneIndices_28;
        public ushort m_boneIndices_29;
        public ushort m_boneIndices_30;
        public ushort m_boneIndices_31;
        public ushort m_boneIndices_32;
        public ushort m_boneIndices_33;
        public ushort m_boneIndices_34;
        public ushort m_boneIndices_35;
        public ushort m_boneIndices_36;
        public ushort m_boneIndices_37;
        public ushort m_boneIndices_38;
        public ushort m_boneIndices_39;
        public ushort m_boneIndices_40;
        public ushort m_boneIndices_41;
        public ushort m_boneIndices_42;
        public ushort m_boneIndices_43;
        public ushort m_boneIndices_44;
        public ushort m_boneIndices_45;
        public ushort m_boneIndices_46;
        public ushort m_boneIndices_47;
        public ushort m_boneIndices_48;
        public ushort m_boneIndices_49;
        public ushort m_boneIndices_50;
        public ushort m_boneIndices_51;
        public ushort m_boneIndices_52;
        public ushort m_boneIndices_53;
        public ushort m_boneIndices_54;
        public ushort m_boneIndices_55;
        public ushort m_boneIndices_56;
        public ushort m_boneIndices_57;
        public ushort m_boneIndices_58;
        public ushort m_boneIndices_59;
        public ushort m_boneIndices_60;
        public ushort m_boneIndices_61;
        public ushort m_boneIndices_62;
        public ushort m_boneIndices_63;
        public byte m_boneWeights_0;
        public byte m_boneWeights_1;
        public byte m_boneWeights_2;
        public byte m_boneWeights_3;
        public byte m_boneWeights_4;
        public byte m_boneWeights_5;
        public byte m_boneWeights_6;
        public byte m_boneWeights_7;
        public byte m_boneWeights_8;
        public byte m_boneWeights_9;
        public byte m_boneWeights_10;
        public byte m_boneWeights_11;
        public byte m_boneWeights_12;
        public byte m_boneWeights_13;
        public byte m_boneWeights_14;
        public byte m_boneWeights_15;
        public byte m_boneWeights_16;
        public byte m_boneWeights_17;
        public byte m_boneWeights_18;
        public byte m_boneWeights_19;
        public byte m_boneWeights_20;
        public byte m_boneWeights_21;
        public byte m_boneWeights_22;
        public byte m_boneWeights_23;
        public byte m_boneWeights_24;
        public byte m_boneWeights_25;
        public byte m_boneWeights_26;
        public byte m_boneWeights_27;
        public byte m_boneWeights_28;
        public byte m_boneWeights_29;
        public byte m_boneWeights_30;
        public byte m_boneWeights_31;
        public byte m_boneWeights_32;
        public byte m_boneWeights_33;
        public byte m_boneWeights_34;
        public byte m_boneWeights_35;
        public byte m_boneWeights_36;
        public byte m_boneWeights_37;
        public byte m_boneWeights_38;
        public byte m_boneWeights_39;
        public byte m_boneWeights_40;
        public byte m_boneWeights_41;
        public byte m_boneWeights_42;
        public byte m_boneWeights_43;
        public byte m_boneWeights_44;
        public byte m_boneWeights_45;
        public byte m_boneWeights_46;
        public byte m_boneWeights_47;
        public byte m_boneWeights_48;
        public byte m_boneWeights_49;
        public byte m_boneWeights_50;
        public byte m_boneWeights_51;
        public byte m_boneWeights_52;
        public byte m_boneWeights_53;
        public byte m_boneWeights_54;
        public byte m_boneWeights_55;
        public byte m_boneWeights_56;
        public byte m_boneWeights_57;
        public byte m_boneWeights_58;
        public byte m_boneWeights_59;
        public byte m_boneWeights_60;
        public byte m_boneWeights_61;
        public byte m_boneWeights_62;
        public byte m_boneWeights_63;
        
        public virtual void Read(PackFileDeserializer des, BinaryReaderEx br)
        {
            m_vertexIndices_0 = br.ReadUInt16();
            m_vertexIndices_1 = br.ReadUInt16();
            m_vertexIndices_2 = br.ReadUInt16();
            m_vertexIndices_3 = br.ReadUInt16();
            m_vertexIndices_4 = br.ReadUInt16();
            m_vertexIndices_5 = br.ReadUInt16();
            m_vertexIndices_6 = br.ReadUInt16();
            m_vertexIndices_7 = br.ReadUInt16();
            m_vertexIndices_8 = br.ReadUInt16();
            m_vertexIndices_9 = br.ReadUInt16();
            m_vertexIndices_10 = br.ReadUInt16();
            m_vertexIndices_11 = br.ReadUInt16();
            m_vertexIndices_12 = br.ReadUInt16();
            m_vertexIndices_13 = br.ReadUInt16();
            m_vertexIndices_14 = br.ReadUInt16();
            m_vertexIndices_15 = br.ReadUInt16();
            m_boneIndices_0 = br.ReadUInt16();
            m_boneIndices_1 = br.ReadUInt16();
            m_boneIndices_2 = br.ReadUInt16();
            m_boneIndices_3 = br.ReadUInt16();
            m_boneIndices_4 = br.ReadUInt16();
            m_boneIndices_5 = br.ReadUInt16();
            m_boneIndices_6 = br.ReadUInt16();
            m_boneIndices_7 = br.ReadUInt16();
            m_boneIndices_8 = br.ReadUInt16();
            m_boneIndices_9 = br.ReadUInt16();
            m_boneIndices_10 = br.ReadUInt16();
            m_boneIndices_11 = br.ReadUInt16();
            m_boneIndices_12 = br.ReadUInt16();
            m_boneIndices_13 = br.ReadUInt16();
            m_boneIndices_14 = br.ReadUInt16();
            m_boneIndices_15 = br.ReadUInt16();
            m_boneIndices_16 = br.ReadUInt16();
            m_boneIndices_17 = br.ReadUInt16();
            m_boneIndices_18 = br.ReadUInt16();
            m_boneIndices_19 = br.ReadUInt16();
            m_boneIndices_20 = br.ReadUInt16();
            m_boneIndices_21 = br.ReadUInt16();
            m_boneIndices_22 = br.ReadUInt16();
            m_boneIndices_23 = br.ReadUInt16();
            m_boneIndices_24 = br.ReadUInt16();
            m_boneIndices_25 = br.ReadUInt16();
            m_boneIndices_26 = br.ReadUInt16();
            m_boneIndices_27 = br.ReadUInt16();
            m_boneIndices_28 = br.ReadUInt16();
            m_boneIndices_29 = br.ReadUInt16();
            m_boneIndices_30 = br.ReadUInt16();
            m_boneIndices_31 = br.ReadUInt16();
            m_boneIndices_32 = br.ReadUInt16();
            m_boneIndices_33 = br.ReadUInt16();
            m_boneIndices_34 = br.ReadUInt16();
            m_boneIndices_35 = br.ReadUInt16();
            m_boneIndices_36 = br.ReadUInt16();
            m_boneIndices_37 = br.ReadUInt16();
            m_boneIndices_38 = br.ReadUInt16();
            m_boneIndices_39 = br.ReadUInt16();
            m_boneIndices_40 = br.ReadUInt16();
            m_boneIndices_41 = br.ReadUInt16();
            m_boneIndices_42 = br.ReadUInt16();
            m_boneIndices_43 = br.ReadUInt16();
            m_boneIndices_44 = br.ReadUInt16();
            m_boneIndices_45 = br.ReadUInt16();
            m_boneIndices_46 = br.ReadUInt16();
            m_boneIndices_47 = br.ReadUInt16();
            m_boneIndices_48 = br.ReadUInt16();
            m_boneIndices_49 = br.ReadUInt16();
            m_boneIndices_50 = br.ReadUInt16();
            m_boneIndices_51 = br.ReadUInt16();
            m_boneIndices_52 = br.ReadUInt16();
            m_boneIndices_53 = br.ReadUInt16();
            m_boneIndices_54 = br.ReadUInt16();
            m_boneIndices_55 = br.ReadUInt16();
            m_boneIndices_56 = br.ReadUInt16();
            m_boneIndices_57 = br.ReadUInt16();
            m_boneIndices_58 = br.ReadUInt16();
            m_boneIndices_59 = br.ReadUInt16();
            m_boneIndices_60 = br.ReadUInt16();
            m_boneIndices_61 = br.ReadUInt16();
            m_boneIndices_62 = br.ReadUInt16();
            m_boneIndices_63 = br.ReadUInt16();
            m_boneWeights_0 = br.ReadByte();
            m_boneWeights_1 = br.ReadByte();
            m_boneWeights_2 = br.ReadByte();
            m_boneWeights_3 = br.ReadByte();
            m_boneWeights_4 = br.ReadByte();
            m_boneWeights_5 = br.ReadByte();
            m_boneWeights_6 = br.ReadByte();
            m_boneWeights_7 = br.ReadByte();
            m_boneWeights_8 = br.ReadByte();
            m_boneWeights_9 = br.ReadByte();
            m_boneWeights_10 = br.ReadByte();
            m_boneWeights_11 = br.ReadByte();
            m_boneWeights_12 = br.ReadByte();
            m_boneWeights_13 = br.ReadByte();
            m_boneWeights_14 = br.ReadByte();
            m_boneWeights_15 = br.ReadByte();
            m_boneWeights_16 = br.ReadByte();
            m_boneWeights_17 = br.ReadByte();
            m_boneWeights_18 = br.ReadByte();
            m_boneWeights_19 = br.ReadByte();
            m_boneWeights_20 = br.ReadByte();
            m_boneWeights_21 = br.ReadByte();
            m_boneWeights_22 = br.ReadByte();
            m_boneWeights_23 = br.ReadByte();
            m_boneWeights_24 = br.ReadByte();
            m_boneWeights_25 = br.ReadByte();
            m_boneWeights_26 = br.ReadByte();
            m_boneWeights_27 = br.ReadByte();
            m_boneWeights_28 = br.ReadByte();
            m_boneWeights_29 = br.ReadByte();
            m_boneWeights_30 = br.ReadByte();
            m_boneWeights_31 = br.ReadByte();
            m_boneWeights_32 = br.ReadByte();
            m_boneWeights_33 = br.ReadByte();
            m_boneWeights_34 = br.ReadByte();
            m_boneWeights_35 = br.ReadByte();
            m_boneWeights_36 = br.ReadByte();
            m_boneWeights_37 = br.ReadByte();
            m_boneWeights_38 = br.ReadByte();
            m_boneWeights_39 = br.ReadByte();
            m_boneWeights_40 = br.ReadByte();
            m_boneWeights_41 = br.ReadByte();
            m_boneWeights_42 = br.ReadByte();
            m_boneWeights_43 = br.ReadByte();
            m_boneWeights_44 = br.ReadByte();
            m_boneWeights_45 = br.ReadByte();
            m_boneWeights_46 = br.ReadByte();
            m_boneWeights_47 = br.ReadByte();
            m_boneWeights_48 = br.ReadByte();
            m_boneWeights_49 = br.ReadByte();
            m_boneWeights_50 = br.ReadByte();
            m_boneWeights_51 = br.ReadByte();
            m_boneWeights_52 = br.ReadByte();
            m_boneWeights_53 = br.ReadByte();
            m_boneWeights_54 = br.ReadByte();
            m_boneWeights_55 = br.ReadByte();
            m_boneWeights_56 = br.ReadByte();
            m_boneWeights_57 = br.ReadByte();
            m_boneWeights_58 = br.ReadByte();
            m_boneWeights_59 = br.ReadByte();
            m_boneWeights_60 = br.ReadByte();
            m_boneWeights_61 = br.ReadByte();
            m_boneWeights_62 = br.ReadByte();
            m_boneWeights_63 = br.ReadByte();
        }
        
        public virtual void Write(PackFileSerializer s, BinaryWriterEx bw)
        {
            bw.WriteUInt16(m_vertexIndices_0);
            bw.WriteUInt16(m_vertexIndices_1);
            bw.WriteUInt16(m_vertexIndices_2);
            bw.WriteUInt16(m_vertexIndices_3);
            bw.WriteUInt16(m_vertexIndices_4);
            bw.WriteUInt16(m_vertexIndices_5);
            bw.WriteUInt16(m_vertexIndices_6);
            bw.WriteUInt16(m_vertexIndices_7);
            bw.WriteUInt16(m_vertexIndices_8);
            bw.WriteUInt16(m_vertexIndices_9);
            bw.WriteUInt16(m_vertexIndices_10);
            bw.WriteUInt16(m_vertexIndices_11);
            bw.WriteUInt16(m_vertexIndices_12);
            bw.WriteUInt16(m_vertexIndices_13);
            bw.WriteUInt16(m_vertexIndices_14);
            bw.WriteUInt16(m_vertexIndices_15);
            bw.WriteUInt16(m_boneIndices_0);
            bw.WriteUInt16(m_boneIndices_1);
            bw.WriteUInt16(m_boneIndices_2);
            bw.WriteUInt16(m_boneIndices_3);
            bw.WriteUInt16(m_boneIndices_4);
            bw.WriteUInt16(m_boneIndices_5);
            bw.WriteUInt16(m_boneIndices_6);
            bw.WriteUInt16(m_boneIndices_7);
            bw.WriteUInt16(m_boneIndices_8);
            bw.WriteUInt16(m_boneIndices_9);
            bw.WriteUInt16(m_boneIndices_10);
            bw.WriteUInt16(m_boneIndices_11);
            bw.WriteUInt16(m_boneIndices_12);
            bw.WriteUInt16(m_boneIndices_13);
            bw.WriteUInt16(m_boneIndices_14);
            bw.WriteUInt16(m_boneIndices_15);
            bw.WriteUInt16(m_boneIndices_16);
            bw.WriteUInt16(m_boneIndices_17);
            bw.WriteUInt16(m_boneIndices_18);
            bw.WriteUInt16(m_boneIndices_19);
            bw.WriteUInt16(m_boneIndices_20);
            bw.WriteUInt16(m_boneIndices_21);
            bw.WriteUInt16(m_boneIndices_22);
            bw.WriteUInt16(m_boneIndices_23);
            bw.WriteUInt16(m_boneIndices_24);
            bw.WriteUInt16(m_boneIndices_25);
            bw.WriteUInt16(m_boneIndices_26);
            bw.WriteUInt16(m_boneIndices_27);
            bw.WriteUInt16(m_boneIndices_28);
            bw.WriteUInt16(m_boneIndices_29);
            bw.WriteUInt16(m_boneIndices_30);
            bw.WriteUInt16(m_boneIndices_31);
            bw.WriteUInt16(m_boneIndices_32);
            bw.WriteUInt16(m_boneIndices_33);
            bw.WriteUInt16(m_boneIndices_34);
            bw.WriteUInt16(m_boneIndices_35);
            bw.WriteUInt16(m_boneIndices_36);
            bw.WriteUInt16(m_boneIndices_37);
            bw.WriteUInt16(m_boneIndices_38);
            bw.WriteUInt16(m_boneIndices_39);
            bw.WriteUInt16(m_boneIndices_40);
            bw.WriteUInt16(m_boneIndices_41);
            bw.WriteUInt16(m_boneIndices_42);
            bw.WriteUInt16(m_boneIndices_43);
            bw.WriteUInt16(m_boneIndices_44);
            bw.WriteUInt16(m_boneIndices_45);
            bw.WriteUInt16(m_boneIndices_46);
            bw.WriteUInt16(m_boneIndices_47);
            bw.WriteUInt16(m_boneIndices_48);
            bw.WriteUInt16(m_boneIndices_49);
            bw.WriteUInt16(m_boneIndices_50);
            bw.WriteUInt16(m_boneIndices_51);
            bw.WriteUInt16(m_boneIndices_52);
            bw.WriteUInt16(m_boneIndices_53);
            bw.WriteUInt16(m_boneIndices_54);
            bw.WriteUInt16(m_boneIndices_55);
            bw.WriteUInt16(m_boneIndices_56);
            bw.WriteUInt16(m_boneIndices_57);
            bw.WriteUInt16(m_boneIndices_58);
            bw.WriteUInt16(m_boneIndices_59);
            bw.WriteUInt16(m_boneIndices_60);
            bw.WriteUInt16(m_boneIndices_61);
            bw.WriteUInt16(m_boneIndices_62);
            bw.WriteUInt16(m_boneIndices_63);
            bw.WriteByte(m_boneWeights_0);
            bw.WriteByte(m_boneWeights_1);
            bw.WriteByte(m_boneWeights_2);
            bw.WriteByte(m_boneWeights_3);
            bw.WriteByte(m_boneWeights_4);
            bw.WriteByte(m_boneWeights_5);
            bw.WriteByte(m_boneWeights_6);
            bw.WriteByte(m_boneWeights_7);
            bw.WriteByte(m_boneWeights_8);
            bw.WriteByte(m_boneWeights_9);
            bw.WriteByte(m_boneWeights_10);
            bw.WriteByte(m_boneWeights_11);
            bw.WriteByte(m_boneWeights_12);
            bw.WriteByte(m_boneWeights_13);
            bw.WriteByte(m_boneWeights_14);
            bw.WriteByte(m_boneWeights_15);
            bw.WriteByte(m_boneWeights_16);
            bw.WriteByte(m_boneWeights_17);
            bw.WriteByte(m_boneWeights_18);
            bw.WriteByte(m_boneWeights_19);
            bw.WriteByte(m_boneWeights_20);
            bw.WriteByte(m_boneWeights_21);
            bw.WriteByte(m_boneWeights_22);
            bw.WriteByte(m_boneWeights_23);
            bw.WriteByte(m_boneWeights_24);
            bw.WriteByte(m_boneWeights_25);
            bw.WriteByte(m_boneWeights_26);
            bw.WriteByte(m_boneWeights_27);
            bw.WriteByte(m_boneWeights_28);
            bw.WriteByte(m_boneWeights_29);
            bw.WriteByte(m_boneWeights_30);
            bw.WriteByte(m_boneWeights_31);
            bw.WriteByte(m_boneWeights_32);
            bw.WriteByte(m_boneWeights_33);
            bw.WriteByte(m_boneWeights_34);
            bw.WriteByte(m_boneWeights_35);
            bw.WriteByte(m_boneWeights_36);
            bw.WriteByte(m_boneWeights_37);
            bw.WriteByte(m_boneWeights_38);
            bw.WriteByte(m_boneWeights_39);
            bw.WriteByte(m_boneWeights_40);
            bw.WriteByte(m_boneWeights_41);
            bw.WriteByte(m_boneWeights_42);
            bw.WriteByte(m_boneWeights_43);
            bw.WriteByte(m_boneWeights_44);
            bw.WriteByte(m_boneWeights_45);
            bw.WriteByte(m_boneWeights_46);
            bw.WriteByte(m_boneWeights_47);
            bw.WriteByte(m_boneWeights_48);
            bw.WriteByte(m_boneWeights_49);
            bw.WriteByte(m_boneWeights_50);
            bw.WriteByte(m_boneWeights_51);
            bw.WriteByte(m_boneWeights_52);
            bw.WriteByte(m_boneWeights_53);
            bw.WriteByte(m_boneWeights_54);
            bw.WriteByte(m_boneWeights_55);
            bw.WriteByte(m_boneWeights_56);
            bw.WriteByte(m_boneWeights_57);
            bw.WriteByte(m_boneWeights_58);
            bw.WriteByte(m_boneWeights_59);
            bw.WriteByte(m_boneWeights_60);
            bw.WriteByte(m_boneWeights_61);
            bw.WriteByte(m_boneWeights_62);
            bw.WriteByte(m_boneWeights_63);
        }
    }
}
